package ua.org.nuos.realm;

import java.util.Properties;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 * Created by IntelliJ IDEA.
 * User: dio
 * Date: 05.10.11
 * Time: 20:03
 * To change this template use File | Settings | File Templates.
 */
public class Configuration {

    protected Properties properties;

    public Configuration() {
        init();
    }

    protected void init() {
        try {
            properties = new Properties();
            properties.load(Configuration.class.getResourceAsStream("/realm.properties"));
        } catch (Exception ex) {
            Logger.getLogger(Configuration.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    public String getJdbsUrl() {
        return properties.getProperty("jdbs.url");
    }

    public String getJdbsLogin() {
        return properties.getProperty("jdbs.login");
    }

    public String getJdbsPassword() {
        return properties.getProperty("jdbs.password");
    }
}
